import {Component} from 'react';
import {TouchableOpacity, View} from 'M/UI/Libraries';
import {Text} from 'react-native';
export default class CaptchaScannerButton extends Component {
  constructor(props) {
    super(props);
    this.state = {
      scanned: false,
    };
  }

  goNavigate() {
    const {routerName, navigation} = this.props;
    navigation.navigate(routerName);
  }

  render() {
    return (
      <View
        style={{
          position: 'absolute',
          right: 50,
          bottom: 60,
          width: 48,
          height: 48,
          zIndex: 1,
          alignItems: 'center',
          justifyContent: 'center',
        }}>
        <TouchableOpacity
          style={{
            width: 48,
            height: 48,
            borderRadius: 30, // 半径设置为高度的一半
            alignItems: 'center',
            justifyContent: 'center',
            backgroundColor: 'red',
            boxShadow: '2px 2px 5px rgba(0,0,0,0.3)',
          }}
          onPress={this.goNavigate.bind(this, 'QRScanner')}>
          <View>
            <Text style={{color: '#ffffff'}}>+</Text>
          </View>
        </TouchableOpacity>
      </View>
    );
  }
}
